package training.controller;

import javax.servlet.http.HttpSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;

import training.form.LoginForm;
import training.dao.LoginADDao;
import training.vo.Customer;
import baytony.util.PagesUtil;

@Controller
@RequestMapping(value = "/login")

public class LoginADController {
	private static Logger log=LoggerFactory.getLogger(LoginADController.class);
	@Autowired
	@Qualifier("LoginADDao")
	private LoginADDao service;
	@RequestMapping(method=RequestMethod.POST)
	public String updateCust(LoginForm login,ModelMap model){
		log.trace("{}.pathVariable() 程式啟動" ,this.getClass());
		model.addAttribute("id",service.postURL(login.getId(),login.getPassword()));
		return "login/login";
	}
	
}
